import {api} from "@/utils/request";


//    根据条件分页查询品牌


export const pageBrand =(brandName:string,page:number,limit:number)=>{

    return api({
        url: "/product/brand/getAll/"+page+"/"+limit,
        method: 'get',
        params: {
            brandName: brandName,
        }
      })
}

// 添加品牌
export const saveBrand =(data:any)=>{

    return api({
        url: "/product/brand/save",
        method: 'post',
        data: data
    })
}



// 修改品牌
export const updateByIdBrand =(data:any)=>{
    return api({
        url: "/product/brand/updateById",
        method: 'put',
        data: data
    })
}


  //    根据id删除品牌
  export const deletedByIdBrand =(id:number)=>{
    return api({
        url: "/product/brand/deleteById/"+id,
        method: 'delete'
    })
}

// 查询所有品牌

export const getAllBrand =()=>{
    return api({
        url: "/product/brand/findAll",
        method: 'get'
      })
}

